/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lolbuilder.masteries;

import java.util.ArrayList;
import lolbuilder.params.Parameters;

/**
 *
 * @author chocoboSan
 */
public class BestDpsMasteriesChoose {
    public static void main(String[] args) {
        MasteriesTreeWalker mtw=new MasteriesTreeWalker();
        FirstEntryOfMasteryTree entryNode=new FirstEntryOfMasteryTree();
        MasteriesBonusCounter mbc=new MasteriesBonusCounter();
        recursiveRootAdd(mtw.chosenPerks,entryNode);
        for (MasteryTreeNode mtn : mtw.chosenPerks) {
            mtn.nbPointsInside=mtn.getMaxCost();
            mtw.PointsInOff=mtn.getMaxCost();
            mtn.applyBonus(mbc);
        }
        Parameters.mbc=mbc;
        System.out.println(mtw.chosenPerks);
    }
    
    public static void recursiveRootAdd(ArrayList<MasteryTreeNode> array, MasteryTreeNode entryNode) {
        array.add(entryNode);
        for (MasteryTreeNode mtn : entryNode.sons) {
            recursiveRootAdd(array, mtn);
        }
    }
}
